home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JComponent$IntVector.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  850 b   |  34 lines

  1. package javax.swing;
  2.  
  3. final class JComponent$IntVector {
  4.    int[] array = null;
  5.    int count = 0;
  6.    int capacity = 0;
  7.  
  8.    void addElement(int var1) {
  9.       if (this.count == this.capacity) {
  10.          this.capacity = (this.capacity + 2) * 2;
  11.          int[] var2 = new int[this.capacity];
  12.          if (this.count > 0) {
  13.             System.arraycopy(this.array, 0, var2, 0, this.count);
  14.          }
  15.  
  16.          this.array = var2;
  17.       }
  18.  
  19.       this.array[this.count++] = var1;
  20.    }
  21.  
  22.    int elementAt(int var1) {
  23.       return this.array[var1];
  24.    }
  25.  
  26.    void setElementAt(int var1, int var2) {
  27.       this.array[var2] = var1;
  28.    }
  29.  
  30.    int size() {
  31.       return this.count;
  32.    }
  33. }
  34.